package com.yaoandw.crawl.model;

import java.io.Serializable;
import java.net.URL;

public class CrawlUrl implements Serializable {
	private URL url;
	private int level;
	public CrawlUrl(URL foundURL, int level) {
		this.url = foundURL;
		this.level = level;
	}
	public URL getUrl() {
		return url;
	}
	public void setUrl(URL url) {
		this.url = url;
	}
	public int getLevel() {
		return level;
	}
	public void setLevel(int level) {
		this.level = level;
	}
	public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        final CrawlUrl other = (CrawlUrl) obj;
         if(!other.getUrl().equals(this.getUrl()))
            return false;
        return true;
   }
	
	public   int   hashCode()   { 
		return   this.getUrl().hashCode(); 
		}
}
